#include <iostream>
#include <vector>
#include <Vector.hpp>
using namespace std;

class Solution
{
public:
    void rotate(vector<int> &nums, int k)
    {
        k = k % nums.size();
        reverse(nums.begin(), nums.end());
        reverse(nums.begin(), nums.begin() + k);
        reverse(nums.begin() + k, nums.end());
    }
};

int main()
{
    cout << "Code189" << endl;
    Solution s;
    std::vector<int> nums{1, 2, 3, 4, 5, 6, 7};
    int k = 3;
    s.rotate(nums, k);
    PrintVector(nums);
    return 0;
}